package com.yanqu.road.entity.tradewar;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

/**
 * 跨服商战公告
 */
public class CrossTradeWarNotice extends DataObject {

	private int activityId;     //活动编号

	private long userId;        //玩家编号

	private UserBaseInfo userBaseInfo = new UserBaseInfo();        //玩家基本信息

	private int killPatronsCount;       //击杀门客数量

	private long noticeTime;            //公告时间

	private long enemyUserId;          //对手编号

	private UserBaseInfo enemyBaseInfo = new UserBaseInfo();    //对手基本信息

	private int battleType;            //战斗类型

	private boolean isAllKill;         //是否全歼

	private int totalChallengeTimes;		//总共挑战次数，缓存不入库
	private int totalKillPatronsCount;		//总共击败门客数量，缓存不入库

	public int getActivityId() {
		return activityId;
	}

	public void setActivityId(int activityId) {
		if(this.activityId != activityId) {
			this.activityId = activityId;
			setUpdateOption();
		}
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setUpdateOption();
		}
	}

	public UserBaseInfo getUserBaseInfo() {
		return userBaseInfo;
	}

	public String getUserBaseInfoJsonStr(){
		if(null == userBaseInfo){
			return "{}";
		}else {
			return JSON.toJSONString(userBaseInfo);
		}
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
		setUpdateOption();
	}

	public int getKillPatronsCount() {
		return killPatronsCount;
	}

	public void setKillPatronsCount(int killPatronsCount) {
		if(this.killPatronsCount != killPatronsCount) {
			this.killPatronsCount = killPatronsCount;
			setUpdateOption();
		}
	}

	public long getNoticeTime() {
		return noticeTime;
	}

	public void setNoticeTime(long noticeTime) {
		if(this.noticeTime != noticeTime) {
			this.noticeTime = noticeTime;
			setUpdateOption();
		}
	}

	public long getEnemyUserId() {
		return enemyUserId;
	}

	public void setEnemyUserId(long enemyUserId) {
		if(this.enemyUserId != enemyUserId) {
			this.enemyUserId = enemyUserId;
			setUpdateOption();
		}
	}

	public UserBaseInfo getEnemyBaseInfo() {
		return enemyBaseInfo;
	}

	public String getEnemyBaseInfoJsonStr(){
		if(null == enemyBaseInfo){
			return "{}";
		}else {
			return JSON.toJSONString(enemyBaseInfo);
		}
	}

	public void setEnemyBaseInfo(UserBaseInfo enemyBaseInfo) {
		this.enemyBaseInfo = enemyBaseInfo;
		setUpdateOption();
	}

	public int getBattleType() {
		return battleType;
	}

	public void setBattleType(int battleType) {
		if(this.battleType != battleType) {
			this.battleType = battleType;
			setUpdateOption();
		}
	}

	public boolean isAllKill() {
		return isAllKill;
	}

	public void setAllKill(boolean allKill) {
		if(this.isAllKill != allKill) {
			isAllKill = allKill;
			setUpdateOption();
		}
	}

	public int getTotalChallengeTimes() {
		return totalChallengeTimes;
	}

	public void setTotalChallengeTimes(int totalChallengeTimes) {
		this.totalChallengeTimes = totalChallengeTimes;
	}

	public int getTotalKillPatronsCount() {
		return totalKillPatronsCount;
	}

	public void setTotalKillPatronsCount(int totalKillPatronsCount) {
		this.totalKillPatronsCount = totalKillPatronsCount;
	}
}
